<template>
  <resource-table :table-columns="tableColumns" @queryTable="queryTable" />
</template>

<script>
export default {
  name: "ResourceTableBasicUseExample",
  data() {
    return {
      tableColumns: [
        {
          prop: "date",
          label: "日期",
        },
        {
          prop: "name",
          label: "姓名",
        },
        {
          prop: "address",
          label: "地址",
        },
        {
          prop: "money",
          label: "金额",
          align: "right",
        },
      ],
      tableData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
          money: 432,
          status: false,
          topping: true,
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1517 弄",
          money: 432,
          status: false,
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1519 弄",
          money: 432,
          status: false,
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1516 弄",
          money: 432,
          status: true,
        },
      ],
    };
  },
  methods: {
    queryTable: function (queryParameters, callback) {
      callback(this.tableData);
    },
  },
};
</script>
